﻿function hideMessagePanel() {
    $(".message-panel").hide();
}

function ShowConfirm(message, control) {
    jConfirm(message, 'Confirmation Dialog', function (r) {
        if (r) {
            __doPostBack(control.name, '');
        }
    });

}

function SelectAllCheckboxes(chkAll, chkCtrlId) {
    checked = chkAll.checked;
    elm = chkAll.form.elements;
    for (i = 0; i < elm.length; i++)
        if (elm[i].type == "checkbox" && elm[i].id.indexOf(chkCtrlId) != -1) {
            if (elm[i].checked != checked)
                elm[i].click();
        }
}